\documentclass[a4paper,11pt]{memoir}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{url}
\usepackage{graphicx}
\usepackage{color} 
\usepackage{colortbl}
\usepackage{listings}
\usepackage[pdftex,
            pagebackref=false,
            colorlinks=true,
            linkcolor=black,
	    citecolor=black,
	    filecolor=black,
	    linkcolor=black,
	    urlcolor=black,
            unicode
           ]{hyperref}



\chapterstyle{bianchi}


%%footprints and headprints
\nouppercaseheads

\createmark{chapter}{left}{nonumber}{}{}
\createmark{section}{right}{nonumber}{}{}
\makeheadrule{headings}{\textwidth}{\normalrulethickness}

\makeevenhead{headings}{\thepage \hspace{0.2cm} \vrule }{FFLocation}{}
\makeoddhead{headings}{\slshape(\thechapter) \leftmark: \lowercase{\textit{\rightmark}}}{}{\vrule \hspace{0.2cm} \thepage}


\makeevenfoot{headings}{}{}{} 
\makeoddfoot{headings}{}{}{}
\makeoddfoot{plain}{}{}{}


%%Paragraphs
\setlength{\parskip}{0.85\baselineskip}

\def\margen#1#2#3{\list{}{\headheight#3\rightmargin#2\leftmargin#1}\item[]}
\let\endmargen=\endlist


\begin{document}

\frontmatter

\input{Frontpage/frontpage}

\oddsidemargin= 2.3cm
\evensidemargin = 0.7cm

%\renewcommand{\appendixtocname}{Apéndices}
\cleardoublepage

\input{Introduction/src/abstract}
\cleardoublepage

\input{Introduction/src/preface}
\cleardoublepage

\setcounter{tocdepth}{3}% subsections and above
\tableofcontents
\cleardoublepage
%\renewcommand*{\contentsname}{Índice extendido}
%\tableofcontents
%\cleardoublepage

%\listoffigures
%\cleardoublepage

%\renewcommand{\listtablename}{Índice de tablas}
%\listoftables
%\cleardoublepage

%\renewcommand{\lstlistlistingname}{Índice de cuadros de código} 
%\lstlistoflistings 
%\cleardoublepage


%\input{portada/resumen}


%%%Main document
\mainmatter


\setcounter{secnumdepth}{4} %%numerar subsections
%%Cambiamos nombres
%\renewcommand{\lstlistingname}{Cuadro de código}
%\renewcommand{\tablename}{Tabla}
%\renewcommand{\appendixname}{Apéndice}
%\renewcommand{\appendixpagename}{Apéndices}


 \include{Introduction/src/introduction} \cleardoublepage
 \include{Requirements/src/requirements} \cleardoublepage
 \include{Planning/src/planning} \cleardoublepage
 \include{WebService/src/webservice} \cleardoublepage
 \include{Android/android} \cleardoublepage
 \include{WebSite/website} \cleardoublepage

\chapter{System architecture}
  \input{Android/Design/src/arquitecturalModel}
\cleardoublepage
\input{Results/src/results}
\cleardoublepage	
\include{Guides/guides}
\cleardoublepage
\include{Installation/src/installation}

\cleardoublepage
\chapter{Tests}
\input{Tests/src/tests}
\cleardoublepage
\appendixpage
\appendix

 \input{Appendices/src/appendices}
\cleardoublepage
\backmatter
\bibintoc
\begin{thebibliography}{99}
\input{Introduction/src/bibliography}
\input{Requirements/src/bibliography}
\input{Planning/src/bibliography}
\input{WebService/src/bibliography}
\input{Android/bibliography}
\input{WebSite/bibliography}
\input{Appendices/src/bibliography}
\end{thebibliography}

\end{document}
